$(function () {
	$.getJSON( "movies", function( data ) {
		var items = [];
		var ul = $('<ul class="movie_list columns-8">').appendTo('#image-gallery');
		$(data.movies).each(function( index, movie ) {
			console.log("show movie " + index + movie +movie.id+movie.poster);
			ul.append( '<li class="movie_thumbnail"><a href="/movie/details/'+movie.id+'"><img src="'+movie.poster+'" class="poster"/><h5>'+movie.title+'</h5></a></li>' );
		});

	});
});


